package com.pudu.mydemo.entity;

/**
 * 处理发送和接收数据的方法公开
 * Created by lgq on 2016/7/25.
 */
public class TcpStringEntity {

    //单例模式，只创造一个TcpStringEntity对象
    private TcpStringEntity(){
    }
    private static  TcpStringEntity instance = null;
    public static TcpStringEntity getInstance(){
        if (instance == null ){
            instance = new TcpStringEntity();
        }
        return instance;
    }

    protected String str;

    /**
     * 获得发送的值
     * @return  TCP客户端接收到的数据
     */
    public String getStr() {
        return str;
    }

    /**
     * 从下位机需要上传的数据
     * @param  str
     */
    public void setStr(String str) {
        this.str = str;
    }
}
